package com.snopy.concurrency.threadFactory;


import java.util.concurrent.ThreadFactory;

/**
 * @author snopy
 * @version 1.0.0
 * @classname CustomThreadFactory
 * @description
 * @email 77912204@qq.com
 * @date 2022/02/19 18:43
 */
public class CustomThreadFactory implements ThreadFactory {
    private final String threadName;
    public CustomThreadFactory(String threadName){
        this.threadName = threadName;
    }
    @Override
    public Thread newThread(Runnable r) {
        return new Thread(r,this.threadName);
    }
}
